package _16FileInputStream读取字节数组_重点;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ReadDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\黑马java培训班\\代码\\itcast\\JavaSE\\day10\\abd\\aa\\b.txt");
        int readLength;//每次读取的数据的长度
        byte[] bytes = new byte[1024];

        while ((readLength=fis.read(bytes))!=-1){
            System.out.println(new String(bytes,0,readLength));
        }
    }
}
